#pragma once
#include<iostream>
#include<list>
#include<deque>
using namespace std;

template <class T, class Con = deque<T>>
class queue
{
public:

    void push(const T& x)
    {
        _queue.push_back(x);
    }

    void pop()
    {
        _queue.pop_front();
    }

    T& back()
    {
        return _queue.back();
    }

    const T& back()const
    {
        return _queue.back();
    }

    T& front()
    {
        return _queue.front();
    }

    const T& front()const
    {
        return _queue.front();
    }

    size_t size()const
    {
        return _queue.size();
    }

    bool empty()const
    {
        return _queue.empty();
    }
private:
    //list<T> _queue;
    deque<T> _queue;
};
void test2(){
    queue<int> q;
    q.push(1);
    q.push(2);
    q.push(3);
    q.push(4);
    while (!q.empty())
    {
        int a = q.front();
        q.pop();
        cout << a << " ";
    }
}
